<?php
	include("dbconfig.php");
	
	function dbconn(){
		global $dbhost,$dbport,$dbname,$dbuser,$dbpass;
		$cn=new PDO('mysql:host='.$dbhost
						.';port='.$dbport
						.';dbname='.$dbname, 
						$dbuser, 
						$dbpass,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") );
		$cn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
		return($cn); 
	}


?>
